Недавно нам понадобилось логировать часть базы данных. И тут мы вспомнили про прекрасный модуль prettytable, который позволяет красиво выводить таблицы.
Итак, имена столбцов задается с помощью атрибута table.field_names. А добавлять строки с данными в таблицу можно методом table.add_row([]), передавая туда список элементов.
Но даже если вы не фанат командной строки, то иногда нужно сохранить отчет о работе вашей программы в текстовый файл. В таком случае можно сохранить саму таблицу, вызвав метод table.get_string().
Недавно нам понадобилось логировать часть базы данных. И тут мы вспомнили про прекрасный модуль prettytable, который позволяет красиво выводить таблицы.
Итак, имена столбцов задается с помощью атрибута table.field_names. А добавлять строки с данными в таблицу можно методом table.add_row([]), передавая туда список элементов.
Но даже если вы не фанат командной строки, то иногда нужно сохранить отчет о работе вашей программы в текстовый файл. В таком случае можно сохранить саму таблицу, вызвав метод table.get_string().
n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”
The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.